﻿using suirui.ZhuMu.Entity;
using suirui.ZhuMu.Entity.Entities;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;

namespace suirui.ZhuMu.Model
{
    public class GetParamsDto
    {
        /// <summary>
        ///关键字
        /// </summary>
        public string Keyword { get; set; }
        /// <summary>
        /// 页码
        /// </summary>
        public int PageIndex { get; set; }
        /// <summary>
        /// 页大小
        /// </summary>
        public int PageSize { get; set; }
    }

    public class GetListDto
    {
        public DateTime StartTime { get; set; }
        public DateTime EndTime { get; set; }

        public int Status { get; set; }

        public int PageIndex { get; set; }

        public int PageSize { get; set; }

    }

    public class GetListByUserDto : GetParamsDto
    {
        public string SurName { get; set; }
        public string Name { get; set; }
        public string Country { get; set; }
        public int Role { get; set; }
        public DateTime EntryTime { get; set; }
        public int IsRoomReport { get; set; }
    }

    public class ReturnListDto<T> : APIResult
    {
        /// <summary>
        /// 数据列表
        /// </summary>
        public List<T> Data { get; set; }
        /// <summary>
        /// 总数
        /// </summary>
        public int total { get; set; }
        /// <summary>
        /// 页码
        /// </summary>
        public int pageNo { get; set; }
        /// <summary>
        /// 页大小
        /// </summary>
        public int pageSize { get; set; }
    }

    public class ReturnLoginDto<T> : APIResult
    {
        /// <summary>
        /// 数据列表
        /// </summary>
        public List<T> Data { get; set; }

        public string AccessToken { get; set; }
        public string RefreshToken { get; set; }

    }

    public class BaseDto
    {
        public long Id { get; set; }
    }

    public class UserInfo: BaseDto
    {        
        /// <summary>
        /// 10位的时间戳
        /// </summary>
        public long timespan { get; set; }
        /// <summary>
        /// MD5(id=""&timespan=&key=c3fcd3d76192e4007dfb496cca67e13b)
        /// </summary>
        public string sign { get; set; }
    }

    public class UserDto : User
    {
        /// <summary>
        /// 10位的时间戳
        /// </summary>
        public long timespan { get; set; }
        /// <summary>
        /// MD5(id=""&timespan=&key=c3fcd3d76192e4007dfb496cca67e13b)
        /// </summary>
        public string sign { get; set; }
    }

    public class PasswordParam
    {
        public long userId { get; set; }
        public string oldPassword { get; set; }
        public string newPassword { get; set; }
        public string confirmPassword { get; set; }
    }


    /// <summary>
    /// 邮件
    /// </summary>
    public class SendEmailDto
    {
        /// <summary>
        /// 接受者邮箱地址(多个邮件逗号分隔)
        /// </summary>
        public string EmailAddress { get; set; }

        /// <summary>
        /// 用途
        /// </summary>
        public string Purpose { get; set; }

        /// <summary>
        /// 标题
        /// </summary>
        public string Title { get; set; }

        /// <summary>
        /// 模板内容
        /// </summary>
        public string TemplateContent { get; set; }

        /// <summary>
        /// 模板类型
        /// </summary>
        public int TemplateType { get; set; }

        /// <summary>
        /// 附件base64
        /// </summary>
        public string File { get; set; }

        /// <summary>
        /// 附件文件名
        /// </summary>
        public string FileName { get; set; }

        /// <summary>
        /// 需要替换的键值对
        /// </summary>
        public Dictionary<string, string> Data { get; set; }

    }
}
